]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: allow disconnecting while activation is in progress
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 19 Aug 2013 21:49:11 +0000 (23:49 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 31 Aug 2013 16:52:01 +0000 (18:52 +0200)
While connecting, the item should read "Turn Off", not "Connect".
To do so, change the meaning of isActive() to be really "not isOff()"

https://bugzilla.gnome.org/show_bug.cgi?id=706262

js/ui/status/network.js

index 169400cad4c6d2e03a2077b87173909224744018..79cb711554c18eba2b9f7aaff8f52000259c2db9 100644 (file)
@@ -104,7 +104,7 @@ const NMConnectionItem = new Lang.Class({
         if (this._activeConnection == null)
             return false;
 
-        return this._activeConnection.state == NetworkManager.ActiveConnectionState.ACTIVATED;
+        return this._activeConnection.state <= NetworkManager.ActiveConnectionState.ACTIVATED;
     },
 
     _sync: function() {
@@ -1083,7 +1083,7 @@ const NMVPNConnectionItem = new Lang.Class({
         if (this._activeConnection == null)
             return false;
 
-        return this._activeConnection.vpn_state == NetworkManager.VPNConnectionState.ACTIVATED;
+        return this._activeConnection.vpn_state != NetworkManager.VPNConnectionState.DISCONNECTED;
     },
 
     _getStatus: function() {